package cn.gdpu.course.web.controller.admin;

import cn.gdpu.course.constant.Constant;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import javax.servlet.http.HttpServletRequest;

/**
 * Created by Administrator on 2018/3/14.
 */

@Controller
@RequestMapping("/admin")
public class AdmIndexController {

	@RequestMapping(method = RequestMethod.GET)
	public String index(HttpServletRequest request, ModelMap model) {
		String username = (String) request.getSession().getAttribute(Constant.user_name);
		model.addAttribute("username", username);
		return "admin/index";
	}

}
